package com.fit.pages;

import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.SessionState;

import com.fit.interfaces.Car;
import com.fit.interfaces.User;

public class CarDetails {

	@Persist("flash")
	private Car chosenCar;

	@SessionState
	private User user;
	
	private boolean userExists;
	
	public Car getChosenCar() {
		return chosenCar;
	}

	
	public User getUser() {
		return user;
	}


	public void setChosenCar(Car chosenCar) {
		this.chosenCar = chosenCar;
	}
	Object onActivate(){
		if(!userExists) return Login.class;
		return null;
	}
	
}
